#ifndef __GZ_INTERFACE_TOPIC_SUBSCRIBE_H__
#define __GZ_INTERFACE_TOPIC_SUBSCRIBE_H__

#include <string>
#include <functional>

namespace Gazella {

typedef std::function<void(const std::string&, uint8_t, const std::string&)> mqtt_subscribe_callback_t;

class GzTopicSubscribe {
public:
    GzTopicSubscribe();
    ~GzTopicSubscribe();

    static int create_subscribe(
        const std::string& topic_filter, //topic filter to subscribe, support wildcard +/#
        mqtt_subscribe_callback_t callback, //topic subscribe callback (it will be called by the threadpool)
        int domain = 0, // domain id, default 0
        uint8_t qos = 0, //qos to subscribe, default 0
        const std::string& describe = "" //topic subscribe describe
    );

    static int delete_subscribe(const std::string& topic_filter);
};
} //namespace Gazella

#endif